home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d15 / infop141.arc / PAGE_08.PAS < prev    next >
Pascal/Delphi Source File  |  1990-12-07  |  4KB  |  156 lines

  1. procedure page_08;
  2.   const
  3.     tick2 = 115200;
  4.  
  5.   var
  6.     i : byte;
  7.     xbyte1 : byte;
  8.     xbyte2 : byte;
  9.     xbyte3: byte;
  10.     xword : word;
  11.     xword2: word;
  12.     temp: word;
  13.  
  14.   begin
  15.   window(1, 3, 30, tlength - 2);
  16.   caption2('Printers');
  17.   xbyte1:=equip and $C000 shr 14;
  18.   writeln(xbyte1);
  19.   if xbyte1 > 0 then
  20.     begin
  21.     caption3('Device');
  22.     writeln;
  23.     caption3('Base port');
  24.     writeln;
  25.     caption3('Timeout');
  26.     writeln;
  27.     caption3('Busy');
  28.     writeln;
  29.     caption3('ACK');
  30.     writeln;
  31.     caption3('Paper out');
  32.     writeln;
  33.     caption3('Selected');
  34.     writeln;
  35.     caption3('I/O error');
  36.     writeln;
  37.     caption3('Timed out');
  38.     for i:=1 to xbyte1 do
  39.       begin
  40.       window(9 + 6 * i, 4, 15 + 6 * i, tlength - 2);
  41.       writeln('LPT', i);
  42.       writeln('$', hex(memw[BIOSdseg : 2 * i + 6], 3));
  43.       writeln(mem[BIOSdseg : $0077 + i]);
  44.       with regs do
  45.         begin
  46.         AH:=$02;
  47.         DX:=0;
  48.         Intr($17, regs);
  49.         yesorno(AH and $80 = $00);
  50.         yesorno(AH and $40 = $40);
  51.         yesorno(AH and $20 = $20);
  52.         yesorno(AH and $10 = $10);
  53.         yesorno(AH and $08 = $08);
  54.         yesorno(AH and $01 = $01)
  55.         end
  56.       end
  57.     end;
  58.   window(twidth - 42, 3, twidth, tlength - 2);
  59.   caption2('Serial ports');
  60.   xbyte1:=equip and $0E00 shr 9;
  61.   writeln(xbyte1);
  62.   if xbyte1 > 0 then
  63.     begin
  64.     if xbyte1 > 4 then
  65.       xbyte1:=4;
  66.     caption3('Device');
  67.     writeln;
  68.     caption3('Base port');
  69.     writeln;
  70.     caption3('UART');
  71.     Writeln;
  72.     caption3('Timeout');
  73.     writeln;
  74.     caption3('Baud rate');
  75.     writeln;
  76.     caption3('Data bits');
  77.     writeln;
  78.     caption3('Parity');
  79.     writeln;
  80.     caption3('Stop bits');
  81.     writeln;
  82.     caption3('Break');
  83.     writeln;
  84.     caption3('RLSD');
  85.     writeln;
  86.     caption3('RI');
  87.     writeln;
  88.     caption3('DSR');
  89.     writeln;
  90.     caption3('CTS');
  91.     writeln;
  92.     caption3('dRLSD');
  93.     writeln;
  94.     caption3('-dRI');
  95.     writeln;
  96.     caption3('dDSR');
  97.     writeln;
  98.     caption3('dCTS');
  99.     for i:=1 to xbyte1 do
  100.       begin
  101.       window(twidth - 35 + 7 * i, 4, twidth - 28 + 7 * i, tlength - 2);
  102.       writeln('COM', i);
  103.       xword:=memw[BIOSdseg : 2 * i - 2];
  104.       writeln('$', hex(xword, 3));
  105.       xbyte2:=Port[xword + 2];
  106.       Port[xword + 2]:=$C1;
  107.       for temp:=1 to 20 do;
  108.       xbyte3:=Port[xword + 2];
  109.       Port[xword + 2]:=xbyte2;
  110.       case ((xbyte3 and $C0) shr 6) of
  111.         0: Writeln('8250');
  112.         1: Writeln('???');
  113.         2: Writeln('16550');
  114.         3: Writeln('16550A')
  115.       end;
  116.       writeln(mem[BIOSdseg : $007B + i]);
  117.       xbyte2:=port[xword + 3];
  118.       port[xword + 3]:=xbyte2 or $80;
  119.       xword2:=cbw(Port[xword], Port[xword + 1]);
  120.       if xword2 = 0 then
  121.         Writeln('N/A')
  122.       else
  123.         Writeln(tick2 / xword2:0:0);
  124.       port[xword + 3]:=xbyte2;
  125.       Writeln((xbyte2 and $03) + 5);
  126.       case xbyte2 and $38 of
  127.         $00, $10, $20, $30 : writeln('none');
  128.         $08 : writeln('odd');
  129.         $18 : writeln('even');
  130.         $28 : writeln('mark');
  131.         $38 : writeln('space')
  132.       end;
  133.       case xbyte2 and $07 of
  134.         $00..$03 : writeln('1');
  135.         $04 : writeln('1.5');
  136.         $05..$07 : writeln('2')
  137.       end;
  138.       yesorno(xbyte2 and $40 = $40);
  139.       with regs do
  140.         begin
  141.         AH:=$03;
  142.         DX:=i - 1;
  143.         Intr($14, regs);
  144.         yesorno(AL and $80 = $80);
  145.         yesorno(AL and $40 = $40);
  146.         yesorno(AL and $20 = $20);
  147.         yesorno(AL and $10 = $10);
  148.         yesorno(AL and $08 = $08);
  149.         yesorno(AL and $04 = $04);
  150.         yesorno(AL and $02 = $02);
  151.         yesorno(AL and $01 = $01)
  152.         end;
  153.       end
  154.     end
  155.   end;
  156.